﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Windows.Forms;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace Design
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Browser.IsMobileDevice)
                MasterPageFile = "~/SiteMaster.Master";
        }

       

        protected void btnLogSign_Click(object sender, EventArgs e)
        {
            if (HttpContext.Current.User.Identity.IsAuthenticated)
            {
                //what to do if the user is logged in already
                MessageBox.Show("You Are Already Logged On", "Already Loggged", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else
            {
                Response.Redirect("~/Login.aspx");
            }


        }

        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut();
        }
    }
}